<me:UILS x:Class="WPFExcelReport.TLS"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                    xmlns:SD="clr-namespace:WPFExcelReport;assembly=TSDDAT"  
                    xmlns:LK="clr-namespace:WPFExcelReport;assembly=TLIEFKO"  
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                    FontSize="14"
                    x:Name="TV"
                    Loaded="Window_Loaded"
     >
    <me:UILS.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:NOTConverter  x:Key="not"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:Divideby100 x:Key="d100"/>
    </me:UILS.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
            
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"></ColumnDefinition>
            <ColumnDefinition Width="1*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" >
            <WrapPanel>
                <Grid Margin="10,0,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>

                    </Grid.ColumnDefinitions>
                    <TextBlock  Grid.Column="0" Text="{Binding Source={Localization:Translate Word=供应商:}}"></TextBlock>
                    <TextBlock  Grid.Column="1" Text="{Binding LSLIEFNR,Source={StaticResource vwMaster}}"    Width="100" />
                    <ex:TXT72  Grid.Column="2" Text="{Binding LSLIEFNA, Converter={StaticResource gb2312},Source={StaticResource vwMaster}}" IsReadOnly="{Binding IsEdit,ElementName=TV,Converter={StaticResource not}}"  MaxLength="10"   CharacterCasing="Upper"    Width="100" />
                </Grid>
                <Grid Margin="10,0,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=供货周期:}}"></TextBlock>
                    <ex:NumericBox Text="{Binding LSLIEFDAT}" IsReadOnly="{Binding IsEdit,ElementName=TV,Converter={StaticResource not}}"  Grid.Column="1"  MaxLength="40"  CharacterCasing="Upper"  
                                    MinWidth="200" Width="Auto" />
                </Grid>
            </WrapPanel>
            <WrapPanel>               
                    <TextBlock    Text="{Binding Source={Localization:Translate Word=公司名:}}"></TextBlock>
                    <ex:TXT72 IsAutoClear="false" Text="{Binding LSNAME1, 
                        Converter={StaticResource gb2312},Source={StaticResource vwMaster}}" 
                              IsReadOnly="{Binding IsEdit,ElementName=TV,Converter={StaticResource not}}"  Grid.Column="1"  MaxLength="40"  CharacterCasing="Upper"  
                                    MinWidth="200" Width="Auto" />
                <ex:TXT72 IsAutoClear="false" Text="{Binding LSNAME2, Converter={StaticResource gb2312},
                    Source={StaticResource vwMaster}}" IsReadOnly="{Binding IsEdit,ElementName=TV,Converter={StaticResource not}}"  
                          Grid.Column="1"  MaxLength="40"  CharacterCasing="Upper"  
                                    MinWidth="200" Width="Auto" />

            </WrapPanel>
            <WrapPanel>
                <Grid Margin="10,0,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=地址:}}"></TextBlock>
                    <ex:TXT72  Grid.Column="1"  Text="{Binding LSSTRASSE1, Converter={StaticResource gb2312},Source={StaticResource vwMaster}}" IsAutoClear="false"  IsReadOnly="{Binding IsEdit,Converter={StaticResource not}}"  
                                     MaxLength="40"  CharacterCasing="Upper"   MinWidth="200" Width="Auto" />
                    <ex:TXT72  Grid.Column="2" Text="{Binding LSSTRASSE2, Converter={StaticResource gb2312},Source={StaticResource vwMaster}}" IsAutoClear="false" 
                                  IsReadOnly="{Binding IsEdit,Converter={StaticResource not}}"   MaxLength="40"  CharacterCasing="Upper" 
                                    MinWidth="200" Width="Auto" />
                </Grid>
            </WrapPanel>
            <WrapPanel>
                <Grid Margin="10,0,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock  Grid.Column="0" Text="{Binding Source={Localization:Translate Word=姓名:}}"></TextBlock>
                    <ex:TXT72   IsAutoClear="false"  IsReadOnly="{Binding IsEdit,ElementName=TV,Converter={StaticResource not}}"  MaxLength="8" Grid.Column="1" CharacterCasing="Upper"  
                                    Text="{Binding LSAPNA1, Converter={StaticResource gb2312},Source={StaticResource vwMaster}}" MinWidth="100" Width="Auto" />
                </Grid>
                <Grid Margin="10,0,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=电话:}}"></TextBlock>
                    <ex:TXT72   IsAutoClear="false"  IsReadOnly="{Binding IsEdit,ElementName=TV,Converter={StaticResource not}}"  MaxLength="20" Grid.Column="1" 
                                    CharacterCasing="Upper"  Text="{Binding LSAPTEL1,Source={StaticResource vwMaster}}" MinWidth="80" Width="Auto" />
                    
                </Grid>
                <Grid Margin="10,0,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=传真:}}"></TextBlock>
                    <ex:TXT72   IsAutoClear="false"  IsReadOnly="{Binding IsEdit,ElementName=TV,Converter={StaticResource not}}"  MaxLength="20" Grid.Column="1" 
                                    CharacterCasing="Upper"  Text="{Binding LSFAX,Source={StaticResource vwMaster}}" MinWidth="80" Width="Auto" />

                </Grid>

            </WrapPanel>
            <WrapPanel>
                <Grid Margin="10,0,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=邮件:}}"></TextBlock>
                    <ex:TXT72  IsAutoClear="false" Text="{Binding LSMAILADR, Converter={StaticResource gb2312},Source={StaticResource vwMaster}}" 
                                   IsReadOnly="{Binding IsEdit,Converter={StaticResource not}}"  MaxLength="40" Grid.Column="1"  
                                   CharacterCasing="Upper"  MinWidth="80" Width="Auto" />
                </Grid>
                <Grid Margin="10,0,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock  Grid.Column="0" Text= "我方佣金:"/>
                    <ex:NumericBox Margin="10,0,0,0"   Grid.Column="1" DecimalPlaces="1"
                                       Text="{Binding LSFRAGRE,Converter={StaticResource d100},Source={StaticResource vwMaster}}" 
                                       Width="50" />
                    <TextBlock  Margin="5,0,0,0" Grid.Column="2" Text= "%"/>
                </Grid>
            </WrapPanel>
          
        </StackPanel>
        <LK:TSLS Grid.Row="0" Grid.RowSpan="2" Grid.Column="1"
            LIEFNR="{Binding KEY,ElementName=TV}"
                  IsAuto="True" 
                  />
    </Grid>
    
</me:UILS>
